package xyz.labmem.result

import cn.hutool.http.ContentType
import cn.hutool.http.server.HttpServerResponse
import com.alibaba.fastjson.JSON
import com.alibaba.fastjson.JSONObject

/**
 * @Author lty
 * @Date 2021/10/11 11:07
 */
open class ResultPageVo<T>(
    code: Int?,
    message: String?,
    data: T,
    var count: Long//数据总数量
) : ResultVo<T>(code, message, data), SendRes {
    //发送
    override fun sendRes(res: HttpServerResponse) {
        res.write(JSON.toJSONString(this), ContentType.JSON.toString())
    }
}